﻿@using VirtualPress.Infrastructure.Entities.Enum;
@using VirtualPress.Infrastructure.Entities.Entity;
@{
    ViewBag.Title = "添加审稿员";
    Layout = "/Areas/WorkSpace/Views/Shared/_WorkSpace.cshtml";
}
@section head{
    <link rel="stylesheet" href="/content/css/uniform.css" />
}
<div id="content-header">
    <h1>
        添加审稿员</h1>
</div>
<div id="breadcrumb">
    <a href="/WorkSpace/console/index" class="tip-bottom"><i class="icon-home"></i>起始页</a> <a href="javascript:" class="current">添加审稿员</a>
</div>
<div class="container-fluid">
    <div class="row-fluid">
        <div class="span12">
            <div class="widget-box">
                <div class="widget-title">
                    <ul class="nav nav-tabs">
                        <li class="active"><a>从现有会员中添加</a></li>
                        <li class=""><a href="/workspace/console/mailtoinvitereviser@{Html.Raw(String.IsNullOrEmpty(Request.QueryString["journal"]) ? "" : "?journal=" + Request.QueryString["journal"]);}">新会员邀请</a></li>
                    </ul>
                </div>
                <div class="widget-content tab-content">
                    <div id="tab1" class="tab-pane active">
                        @if (ViewBag.User == null)
                        {
                            <form id="form-wizard" action="/workspace/console/InviteReviser" method="post"
                            class="form-horizontal ui-formwizard">
                            <input type="hidden" name="journal" value="@Request.QueryString["journal"]" />
                            <div id="form-wizard-1" class="step">
                                <div class="widget-content ui-formwizard-content nopadding">
                                    <div class="new-update clearfix">
                                        <i class="icon-ok-sign"></i>
                                        <div class="update-done">
                                            <a title="" href="javascript:;"><strong>从现有会员中添加</strong></a> <span>从已在本站注册的会员中查找，并邀请其成为本期刊的初审员</span>
                                        </div>
                                    </div>
                                    @if (Request.HttpMethod.ToUpper() == "POST")
                                    {
                                        <div class="control-group">
                                            <p style="color: #b94a48; text-align: center;">
                                                * 不存在该账号的平台用户，请从新输入
                                            </p>
                                        </div>
                                    }
                                    <div class="control-group">
                                        <label class="control-label">
                                            会员账号 (*)</label>
                                        <div class="controls">
                                            <input type="text" name="UserAccount" placeholder="example@gmail.com" class="{required:true,email:true}" value="@ViewBag.Account"/>
                                        </div>
                                    </div>
                                    <div class="form-actions">
                                        <a class="btn btn-primary" href="/workspace/console/Reviser@{Html.Raw(String.IsNullOrEmpty(Request.QueryString["journal"]) ? "" : "?journal=" + Request.QueryString["journal"]);}">
                                            返回</a>
                                        <input class="btn btn-primary ui-wizard-content ui-formwizard-button" type="submit"
                                            value="Search" />
                                    </div>
                                </div>
                            </div>
                            </form>
                        }
                        else
                        {
                            User user = ViewBag.User;
                            <form action="/workspace/console/DoReviserInvite" method="post">
                            <input type="hidden" name="journal" value="@Request.QueryString["journal"]" />
                            <input type="hidden" name="UserAccount" value="@ViewBag.Account" />
                            <div class="widget-content nopadding">
                                <ul class="recent-comments">
                                    <li>
                                        <div class="user-thumb">
                                            <img style="width:40px;height:40px;" alt="User" src="@user.Photo" />
                                        </div>
                                        <div class="comments">
                                            <span class="user-info">@user.NickName @user.Gender.Mapping() @(DateTime.Now.Subtract(user.Birthday).Days / 365)岁
                                                &nbsp;&nbsp; 现居：@user.Area.Mapping()</span>
                                            <p>
                                                <a href="javascript:;">注册时间：@user.RcdDate.ToString("yyyy-MM-dd")<br />
                                                    联系邮箱：@user.Email
                                                    <br />
                                                </a>
                                            </p>
                                            <input id="next" type="submit" class="btn btn-success btn-mini" value="初审员邀请" />
                                        </div>
                                    </li>
                                </ul>
                            </div>
                            </form>
                        }
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
@section tail{
    <script type="text/javascript" src="/scripts/jquery.validate.js"></script>
    <script type="text/javascript" src="/scripts/unicorn.wizard.js"></script>
    <script type="text/javascript" src="/scripts/jquery.metadata.js"></script>
    <script type="text/javascript" src="/scripts/jquery.wizard.js"></script>
<script type="text/javascript">
    $(function () {
        $('#likorganization ul li:eq(0)').addClass('active');
        $('#likorganization').addClass('open');
    });
</script>
